home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pasclern.zip
/
ALLVAR.PAS
next >
Wrap
Pascal/Delphi Source File
|
1993-04-01
|
863b
|
29 lines
PROGRAM all_simple_variable_types;
VAR a,b : INTEGER;
c,d : BYTE;
dog_tail : REAL;
puppy : BOOLEAN;
animal_cookies : CHAR;
BEGIN
a := 4;
b := 5;
c := 212;
d := c + 3;
dog_tail := 345.12456;
puppy := b > a; (* since b is greater than a, puppy
will be assigned the value TRUE *)
animal_cookies := 'R'; (* this is a single character *)
WRITELN('The integers are',a:5,b:5);
WRITELN('The bytes are', c:5,d:5); (* notice that the spaces
prior to the c will be
ignored on output *)
WRITELN('The real value is',dog_tail:12:2,dog_tail:12:4);
WRITELN;
WRITELN('The boolean value is ',puppy,puppy:13);
WRITELN('The char variable is an ',animal_cookies);
END.